var modulePath;
var projectPath;

/**
 * 消息弹出层
 */
function PROMPTALTER(msg){
	//墨绿深蓝风
	layer.alert(msg, {
	  skin: 'layui-layer-molv' //样式类名
	  ,closeBtn: 1
	});
}

/**
 * iframe弹出层
 */
function iframePop(title,url,height,width){
	if(height == "" || width == ""){
		layer.open({
			skin: 'layui-layer-molv', //样式类名
			type: 2,
			  title: title,
			  shadeClose: true,
			  shade: 0.8,
			  area: ['380px', '90%'],
			  btn:['保存','取消'],
			  content: url, //iframe的url
			  yes: function(index, layero){
				  	$(layero).find("iframe")[0].contentWindow.save();
				  }
			}); 
	}else{
		layer.open({
			skin: 'layui-layer-molv', //样式类名
			  type: 2,
			  title: title,
			  shadeClose: true,
			  shade: 0.8,
			  area: [height, width],
			  btn:['保存','取消'],
			  content: url, //iframe的url
			  yes: function(index, layero){
				  $(layero).find("iframe")[0].contentWindow.save();
				  }
				  
			}); 
	}
	
}


//通用新增方法
function add(){
	var url = projectPath + modulePath + "/add";
	iframePop("新增",url,"100%","100%");
}

function update(){
	var id = $("#table_list_3").jqGrid('getGridParam', 'selrow');
	var url = projectPath + modulePath + "/update?id="+id;
	iframePop("修改",url,"100%","100%");
	
}




